import { http } from '@/utils/http.js';
import { config } from '../utils/config';

// 新增趣事圈
export function addFunCircleApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/save',
		method: 'POST',
		data: param
	})
}

// 获取趣事圈数据
export function getFunCircleApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/findPageList',
		method: 'POST',
		data: param
	})
}

// 1点赞。2踩。3收藏。4转发
export function currencyCountApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/currencyCount',
		method: 'GET',
		data: param
	})
}

// 评论里面点赞
export function commentsCurrencyCountApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/comments/currencyCount',
		method: 'GET',
		data: param
	})
}

// 查询评论列表数据
export function getFindPageListApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/comments/findPageList',
		method: 'POST',
		data: param
	})
}

// 评论新增接口
export function commentsSaveApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/comments/save',
		method: 'POST',
		data: param
	})
}

// 评论删除接口
export function commentsDelByIdApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/comments/delById',
		method: 'GET',
		data: param
	})
}

// 回复分页接口数据
export function recoverFindPageListApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/recover/findPageList',
		method: 'POST',
		data: param
	})
}

// 回复评论添加回复接口
export function recoverSaveApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/recover/save',
		method: 'POST',
		data: param
	})
}

// 趣事圈回复通用点赞接口
export function recoverCurrencyCountApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/recover/currencyCount',
		method: 'GET',
		data: param
	})
}

// 删除评论回复评论
export function recoverDelByIdApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/graphic/recover/delById',
		method: 'GET',
		data: param
	})
}

// 关注
export function concernOrCancelApi(param) {
	return http({
		url: config.URL_PRD + '/api/v1/concern/concernOrCancel',
		method: 'POST',
		data: param
	})
}
